package com.baoyouqun.domain.CreateCmd;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class UserPointsRecordCreateCmd implements Serializable {

    private static final long serialVersionUID = 1L;
    // 自定义的查询内容
    @ApiModelProperty(value = "主键ID（雪花算法生成）")
    private String id;

    @ApiModelProperty(value = "用户ID（关联user_points表的user_id）")
    private String userId;

    @ApiModelProperty(value = "积分变动金额（正数=增加，负数=扣减）")
    private Integer changePoints;

    @ApiModelProperty(value = "变动类型：1=充值赠送，2=任务奖励，3=积分兑换扣减，4=系统调整，5=其他")
    private Byte changeType;

    @ApiModelProperty(value = "关联业务单号（如充值订单号、兑换订单号，非必填）")
    private String bizNo;

    @ApiModelProperty(value = "类型描述")
    private String type;
    @ApiModelProperty(value = "业务描述（如“充值赠送”“完成每日任务奖励”）")
    private String bizDesc;

    @ApiModelProperty(value = "变动前可用积分（冗余字段，便于快速核对）")
    private Integer pointsBeforeChange;

    @ApiModelProperty(value = "变动后可用积分（冗余字段，便于快速核对）")
    private Integer pointsAfterChange;

    @ApiModelProperty(value = "积分变动时间（与前端展示时间一致）")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "操作人（系统操作填“system”，人工操作填账号，非必填）")
    private String operator;

    @ApiModelProperty(value = "备注（如特殊场景说明，非必填）")
    private String remark;


}